package com.newly.center.business.api;


import com.newly.api.business.feign.MQTTReceiverClient;
import com.newly.center.business.service.MQTTReceiverService;
import com.newly.common.base.constants.ServerUriConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(ServerUriConstant.NEWLY_BUSINESS_MQTT_Receiver)
public class MQTTReceiverController implements MQTTReceiverClient {

    @Autowired
    MQTTReceiverService mqttReceiverService;

    @Override
    public void register(String topic, String message) {
        mqttReceiverService.register(topic,message);
    }

    @Override
    public void setVehicleInfo(String topic, String message) {
        mqttReceiverService.setVehicleInfo(topic,message);
    }

    @Override
    public void setIllegalVehicleInfo(String topic, String message) {
        mqttReceiverService.setIllegalVehicleInfo(topic,message);
    }

}
